/**
 * 包含n个接口请求函数的模块
 * 函数的返回值: promise对象
 */
import {ajax, GET,} from './ajax'

// const BASE_URL = 'https://api.map.baidu.com'
const BASE_URL = 'baidu'
const ACCESS_KEY = '3GBDVezdN6lmtX0H6NGIzIhGUEXyE1CM'

// 1、通过关键字查询区域
export const selectRegionByKeyword = ({query, tag, region}) =>
    ajax(`${BASE_URL}/place/v2/search`, GET, {
        query,
        tag,
        region,
        output: 'json',
        ak: ACCESS_KEY
    })

